//index.js
const db = wx.cloud.database()
Page({
  data: {
    showModal1:false,
    showModal2:false,
    showModal3:false,
    showModal4:false,
    swiptlist:[]
  },
  gets(data){
    console.log(data)
    let path = data.currentTarget.dataset.gid
    wx.navigateTo({
      url: '../../pages/'+path+'/index',
    })
  },
  cardpopup1(){
    this.setData({
      showModal1:true
    })
  },
  cardpopup2(){
    this.setData({
      showModal2:true
    })
  },
  cardpopup3(){
    this.setData({
      showModal3:true
    })
  },
  cardpopup4(){
    this.setData({
      showModal4:true
    })
  },
  onLoad: function (options) {
    db.collection('bannar')
    .get().then(res=>{
      console.log(res)
      this.setData({
        swiptlist:res.data
      })
    })
    
  },
  
})
